//
// Mutex.hpp for  in ~/Dropbox/Projets/raytracer-2016/Includes/DesignPattern/ThreadPool/
//
// Made by Jonathan
// Login   <ledey_l@epitech.net>
//
// Started on  Fri Sep 20 13:28:27 2013 Jonathan
// Last update Fri Sep 20 13:46:24 2013 Jonathan
//

#ifndef			MUTEX_HPP_
# define		MUTEX_HPP_

# include		<pthread.h>

namespace		DesignPattern
{
  namespace		ThreadPool
  {
    class		Mutex
    {
    private:
      Mutex(Mutex const &rCopy);
      Mutex		&operator=(Mutex const &rCopy);

      pthread_mutex_t	mMutex;
      volatile bool	mIsLocked;

    protected:

    public:
      Mutex(void);
      ~Mutex(void);

      void		Lock(void);
      void		Unlock(void);
      pthread_mutex_t	*GetMutex(void);
    };
  };
};

#endif			/* MUTEX_HPP_ */
